import i18n from '@/common/lang'

export const columns = [
  {
    label: i18n.t('orderSynergy.purchase.purchaseNumber'),
    minWidth: 150,
    prop: 'number',
    fixed: true
  },
  {
    label: '订单类型',
    minWidth: 120,
    prop: 'orderType'
  },
  {
    label: i18n.t('orderSynergy.purchase.purchaseOrg'),
    prop: 'purchaseOrg',
    minWidth: 140
  },
  {
    label: i18n.t('orderSynergy.purchase.purchaseTeam'),
    prop: 'purchaseTeam',
    minWidth: 140
  },
  {
    label: i18n.t('orderSynergy.purchase.supplierName'),
    prop: 'supplierName',
    minWidth: 140
  },
  {
    label: i18n.t('orderSynergy.purchase.quantity'),
    prop: 'totalQuantity',
    minWidth: 100
  },
  {
    label: i18n.t('orderSynergy.purchase.amount'),
    prop: 'totalAmount',
    minWidth: 100
  },
  {
    label: i18n.t('orderSynergy.purchase.createId'),
    prop: 'createName',
    minWidth: 100
  },
  {
    label: i18n.t('orderSynergy.purchase.createTime'),
    prop: 'createTime',
    minWidth: 170
  },
  {
    label: i18n.t('orderSynergy.purchase.orderState'),
    prop: 'state',
    with: 80
  }
]

export const actions = [
  {
    key: 'detail',
    text: i18n.t('common.view')
    // permissions: 'orderSynergy:purchase:detail'
  },
  {
    key: 'send',
    text: i18n.t('common.send')
    // permissions: 'orderSynergy:purchase:send'
  },
  {
    key: 'cancel',
    text: i18n.t('common.cancel')
    // permissions: 'orderSynergy:purchase:send'
  }
]

// 对账明细列表
export const materialColumns = [
  {
    label: '序号',
    width: 50,
    prop: 'lineNumber',
    fixed: true
  },
  {
    label: '来源单号',
    minWidth: 140,
    prop: 'sourceNumber'
  },
  {
    label: '来源类型',
    minWidth: 140,
    prop: 'sourceType'
  },
  {
    label: i18n.t('config.material.code'),
    minWidth: 140,
    prop: 'materialCode'
  },
  {
    label: i18n.t('config.material.name'),
    minWidth: 140,
    prop: 'materialName'
  },
  {
    label: i18n.t('config.material.specs'),
    minWidth: 140,
    prop: 'materialSpecs'
  },
  {
    label: i18n.t('config.materialType.name'),
    minWidth: 140,
    prop: 'materialType'
  },
  {
    label: i18n.t('config.material.unit'),
    minWidth: 80,
    prop: 'materialUnit'
  },
  {
    label: '需求数量',
    minWidth: 100,
    prop: 'quantity'
  },
  {
    label: '剩余发货数量',
    minWidth: 100,
    prop: 'remainingQuantity'
  },
  {
    label: '单价(不含税)/元',
    minWidth: 140,
    prop: 'untaxedPrice'
  },
  {
    label: '税率/%',
    minWidth: 80,
    prop: 'taxRate'
  },
  {
    label: '单价(含税)/元',
    minWidth: 120,
    prop: 'unitPrice'
  },
  {
    label: '小计',
    minWidth: 100,
    prop: 'totalPrice'
  },

  {
    label: '期望交货日期',
    minWidth: 130,
    prop: 'deliveryDate'
  },
  {
    label: '收货库房',
    minWidth: 140,
    prop: 'addrName'
  },
  {
    label: '库房地址',
    minWidth: 140,
    prop: 'address'
  },
  {
    label: '库房负责人',
    minWidth: 100,
    prop: 'contacts'
  },
  {
    label: '联系电话',
    minWidth: 130,
    prop: 'contactsPhone'
  }
]
